##Sa_ExampleDataDropSite##where the
#Sa_
string denotes the start of the site and the following ##
the end. In between these two markers lies the name of the site. There are a number of different pre-defined types of data drop sites available for different uses in Sapphire/Web:
Thus the server application could obtain a filename from a database and insert it into the template HTML in order to dynamically determine which of a number of graphics should be displayed. The HTML for that would look like this:
<img src="##Sa_ImageName##" height=60 width=45>After substitution, the HTML that arrives at the browser might be
<img src="gifs/promorg3.gif" height=60 width=45>which would then result in a callback from the browser for the named GIF file.
These tags are used in many different ways. You should also refer to the help on HTML extensions to see examples on using loops and creating hotlists for your HTML pages.
##Sa_SQL =select * from authors##The SQL code is delimited by the "
=
" and the "##
" symbols.##Sa_FILE=filespec##where filespec is the path to a file. When the server application encounters this markup while playing a template file, the contents of the file are substituted for the tag. Note that the path must be valid for the server application as it runs on the server side.
For example if the file contains other sites, they will not only not be processed, but the sites would actually appear in the returned HTML. This capability is a form of server-side include.
The following file path specification is valid for both the Windows and UNIX versions of Sapphire:
##Sa_FILE=../librarydir/JavaScripts.js##This relative file path enables you to include files from a common area in multiple projects. Project maintenance is streamlined because you have only one copy of a file to update. The above example assumes that all your projects have an HTML directory option such that the projects are at the same directory level and the common area is also at the same level. This makes the task of moving this "site" easy since all you need is to copy from the parent directory on down.